//收入
"use strict"
const mvc = require('cosjs.mvc');
const dbase = require("../dbase");
class income extends dbase.gzone.mongodb {
    constructor(sid) {
        super(sid, 'income');
    }
    incr(time, key, val) {
        let sign = mvc.library("time/sign", time)
        let query = this.query(sign);
        let update = { "$inc": this.values(key, val) };
        let option = { "upsert": true, "multi": false };
        update['$setOnInsert'] = { "time": sign };
        return this.update(query, update, option);
    }
}
module.exports = function (sid) {
    return new income(sid);
}


